package blog

import (
	"fmt"
	"strconv"

	"github.com/gin-gonic/gin"
)

func postHandler(c *gin.Context) {
	c.JSON(300, gin.H{
		"name": "wxp",
	})
}

func commentHandler(c *gin.Context) {

	c.JSON(300, gin.H{
		"name": "wxp",
	})
}

func diviHandler(c *gin.Context) {

	divS := c.Query("age")
	fmt.Println(divS)
	di, _ := strconv.Atoi(divS)
	fmt.Println(di)
	i := 6 / di
	c.JSON(300, gin.H{
		"name":  "wxp",
		"value": i,
	})
}
